<?php
require_once('mysql_connect.php');
$query = "SELECT * FROM movie ORDER BY id DESC";
$result = @mysql_query($query);

?>
<HTML>
<TITLE>Quon Labels</TITLE>
<BODY BGCOLOR=FFFFFF text=000000>
<?php
$cellcount = 0;
$cellspace = 0;
while($row = @mysql_fetch_array($result)){
	if($cellcount == 0){
?>
	<TABLE CELLPADDING=0 CELLSPACING=0>
	<TR height="36"><TD width="13" height="36"></TD><TD width="288" height="36"></TD><TD width="9" height="36"></TD><TD width="288" height="36"></TD><TD width="13" height="36"></TD></TR>
	<?php
	}
	if($cellspacing == 0){
	$cellcount = $cellcount+1;
	?>
	<TR height="144"><TD width="13" height="144"></TD><TD width="288" height="144"><IMG SRC="barcode.php?id=<?php echo $row['id'];?>" width="288" height="144"></TD><TD width="9" height="144"></TD>
	<?php
	$cellspacing =1;
	}else{
	$cellcount = $cellcount+1;
	?>
	<TD width="288" height="144"><IMG SRC="barcode.php?id=<?php echo $row['id'];?>" width="288" height="144"></TD><TD width="13" height="144"></TD></TR>
	<?php
	$cellspacing =0;
	}
	?>
	
	<?php
	if($cellcount == 10){
	?>
	<TR height="36"><TD width="13" height="36"></TD><TD width="288" height="36"></TD><TD width="9" height="36"></TD><TD width="288" height="36"></TD><TD width="13" height="36"></TD></TR>
	</TABLE>
	
	<?php
	$cellcount = 0;
	}
	?>
<?php
}
?>
</BODY>
</HTML>